<template>
  <div id="container">1</div>
</template>

<script>
export default {
  mounted() {
    // 1.新建地图实例
    var map = new BMap.Map('container')
    // 2.中心点
    var point = new BMap.Point(116.404, 39.915)
    map.centerAndZoom(point, 15)
    // 3.滚轮滚动
    map.enableScrollWheelZoom(true)
    // 4.圆形
    const Circle = new BMap.Circle(point, 1000, 'pink')
    map.addOverlay(Circle)
    Circle.getStrokeColor('skyblue')
    Circle.enableEditing()
    Circle.getStrokeOpacity(0.3)
    Circle.setFillOpacity(0.2)
    // 多边形
    var polygon = new BMap.Polygon([
      new BMap.Point(116.387112, 39.920977),
      new BMap.Point(116.385243, 39.913063),
      new BMap.Point(116.394226, 39.917988),
      new BMap.Point(116.401772, 39.921364),
      new BMap.Point(116.41248, 39.927893)
    ], { strokeColor: 'blue', strokeWeight: 2, strokeOpacity: 0.5 }) // 创建多边形
    map.addOverlay(polygon) // 增加多边形

    polygon.enableEditing()
  }
}
</script>

<style>
#container{
  width: 1400px;
  height: 800px;
}
.anchorBL{
    display: none!important;;
}
</style>
